package cn.king.springframework.beans.factory.support;

import cn.king.springframework.core.io.DefaultResourceLoader;
import cn.king.springframework.core.io.ResourceLoader;

public  abstract class AbstractBeanDefinitionReader implements BeanDefinitionReader{
    private final BeanDefinitionRegistry registry;
    private ResourceLoader resourceLoader;

    public AbstractBeanDefinitionReader(BeanDefinitionRegistry registry) {

        this(registry,new DefaultResourceLoader());
    }

    public AbstractBeanDefinitionReader(BeanDefinitionRegistry registry, ResourceLoader resourceLoader) {

        this.registry = registry;
        this.resourceLoader = resourceLoader;
    }

    @Override
    public BeanDefinitionRegistry getRegistry() {

        return registry;
    }

    @Override
    public ResourceLoader getResourceLoader() {

        return resourceLoader;
    }
}
